package com.example.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.example.pojo.utils.ProcIns;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 审批模版实体类
 *
 * @author ding
 * @since 2024/7/10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("template")
public class Template {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    /** 启用状态：0：启用；1：禁用 */
    private Integer status;
    /** 模版对应的审批人id */
    private String person;
    /** 流程部署ID */
    private String procDefId;
    /** 流程ID */
    private String procDepId;

    /** 模版对应的阶段id */
    private Integer stageId;
    /** 模版对应的类型状态 0：审批  1：项目阶段 */
    private String type;

    private Integer isDeleted;


    /** 乐观锁版本号 */
    @ApiModelProperty("乐观锁版本号")
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /** 更新时间 */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private String person1;
    @TableField(exist = false)
    private String person2;
    @TableField(exist = false)
    private String person3;
}
